#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/printk.h>
#include <linux/version.h>
#include <linux/of_platform.h>

#include "ei_type.h"
#include "ei_common.h"
#include "ei_os.h"
/* #include "audiocommon.h" */

extern int AUDIOCOMMON_ModInit(void);
extern void AUDIOCOMMON_ModExit(void);

static int ei_audiocommon_probe(struct platform_device *pdev)
{
    os_printk("%s\n", "init ok");

    AUDIOCOMMON_ModInit();

    return 0;
}

static int ei_audiocommon_remove(struct platform_device *pdev)
{
    os_printk("%s\n", "exit ok");

    AUDIOCOMMON_ModExit();

    return 0;
}

static const struct of_device_id ei_audiocommon_match[] = {
    { .compatible = "ei, ei-audiocommon" },
    {},
};

MODULE_DEVICE_TABLE(of, ei_audiocommon_match);

static struct platform_driver ei_audiocommon_driver = {
    .probe          = ei_audiocommon_probe,
    .remove         = ei_audiocommon_remove,
    .driver         = {
        .name            = "ei_audiocommon",
        .of_match_table = ei_audiocommon_match,
    },
};

os_module_platform_driver(ei_audiocommon_driver);

MODULE_LICENSE("Proprietary");


